home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bmsfedit.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.4 KB  |  71 lines

  1. /* 
  2.  *
  3.  * $Id: k3bmsfedit.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16.  
  17. #ifndef K3B_MSF_EDIT_H
  18. #define K3B_MSF_EDIT_H
  19.  
  20.  
  21. #include <qspinbox.h>
  22. #include <qstring.h>
  23. #include <qvalidator.h>
  24.  
  25. #include <k3bmsf.h>
  26. #include "k3b_export.h"
  27.  
  28. class K3bMsfValidator : public QRegExpValidator
  29. {
  30.  public:
  31.   K3bMsfValidator( QObject* parent = 0, const char* name = 0 );
  32. };
  33.  
  34.  
  35. class LIBK3B_EXPORT K3bMsfEdit : public QSpinBox
  36. {
  37.   Q_OBJECT
  38.  
  39.  public:
  40.   K3bMsfEdit( QWidget* parent = 0, const char* name = 0 );
  41.   ~K3bMsfEdit();
  42.  
  43.   QSize sizeHint() const;
  44.  
  45.   void setFrameStyle( int style );
  46.   void setLineWidth(int);
  47.  
  48.   K3b::Msf msfValue() const;
  49.  
  50.  signals:
  51.   void valueChanged( const K3b::Msf& );
  52.  
  53.  public slots:
  54.   void setValue( int v );
  55.   void setText( const QString& );
  56.   void setMsfValue( const K3b::Msf& );
  57.   void stepUp();
  58.   void stepDown();
  59.  
  60.  protected:
  61.   QString mapValueToText( int );
  62.   int mapTextToValue( bool* ok );
  63.   int currentStepValue() const;
  64.  
  65.  private slots:
  66.   void slotValueChanged( int );
  67. };
  68.  
  69.  
  70. #endif
  71.